<template>
	<view>
		<u-navbar :title="$t('c2c.detail')" showback="true"></u-navbar>
		<view class="m-30">
			<text class="d-block font-size-32 text-center" style="color: #666666">{{article.title}}</text>
			<view class="font-size-28 text-center mt-10">{{article.create_time}}</view>
			<u-parse class="mt-20"  :html="article.content"></u-parse>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				article:{}
			};
		},
		onLoad(options) {
			const {id} = options
			this.id = id
		},
		onShow() {
			this.getNewsDetail()
		},
		methods:{
			getNewsDetail(){
				this.$https.initData({
				  url: 'news/detail',
				  data: {
					  id: this.id
				  },
				  type: 'POST'
				}, (res, msg) => {
					this.article = res
					console.log(res)
				})
			}
		}
	}
</script>

<style lang="scss">

</style>
